#include<iostream>
#include<memory>
#include"Chat_Server.hpp"
using std::cout;
using std::endl;
void Usage(char*arg)
{
    cout<<"USAGE:"<<endl;
    cout<<arg<<" server port"<<endl;
}
int main(int argc,char*argv[])
{
    if(argc!=2)
    {
        Usage(argv[0]);
        exit(1);
    }
    uint16_t port=std::stoi(argv[1]);
    // std::unique_ptr<Chat_server> csp(new Chat_server(port));
    std::unique_ptr<Chat_server> csp=std::make_unique<Chat_server>(port);
    csp->InitServer();
    csp->StartServer();

    


    return 0;
}